-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paths for trips #724
Paths for trips #724
Conversation
fc4a272
to
5bd6a6c
Compare
|
||
class AddPathToTrips < ActiveRecord::Migration[8.0] | ||
def change | ||
add_column :trips, :path, :line_string, srid: 3857 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think 3857 is the correct value to use. I think it should be 4326.
Ref: https://gis.stackexchange.com/a/380296/55872
Not sure it matters right now (i.e. it probably works with 3857 too for now), but it might cause issues later, if you try to use PostGIS functions like ST_Contains()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert in GIS, but I did my small research and came to a conclusion that 3857 serves well in case of flat planar projections, specifically for web mapping. But as I said, not an expert, so if you could provide pro/contra for 4326, I may consider changing it in the future. Thank you!
Added
Changed